package com.atguigu.springcloud.alibaba.myfallback;

import com.atguigu.springcloud.entities.CommonResult;
import com.atguigu.springcloud.entities.Payment;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @auther zzyy
 * @create 2020-02-14 18:14
 */
public class MyFallBack
{
    public static CommonResult fallback01(@PathVariable Long id, Throwable e)
    {
        return new CommonResult<>(447,"MyFallBack-fallback01"+e.getMessage(),new Payment(id,"null"));
    }
    public static CommonResult fallback02(@PathVariable Long id, Throwable e)
    {
        return new CommonResult<>(447,"MyFallBack-fallback02"+e.getMessage(),new Payment(id,"null"));
    }
}
